<%@ page language="java" errorPage="/error.jsp" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ page language="java" import="com.fish.anne.service.SystemRegionManager" import="org.springframework.web.context.support.WebApplicationContextUtils"
import="org.springframework.context.ApplicationContext" 
import="com.fish.anne.model.SystemRegion"   isErrorPage="true"
import="java.util.List"  %>

<%

ApplicationContext ctx =
            WebApplicationContextUtils.getRequiredWebApplicationContext(request.getSession().getServletContext());
SystemRegionManager ssm = (SystemRegionManager)ctx.getBean("systemRegionManager");

List<SystemRegion> systemRegions = ssm.getAll();
	
request.setAttribute("systemRegions",systemRegions);

 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title></title>
		<%@ include file="/jsp/front/common/header.jsp"%>
	<script type="text/javascript" src="scripts/jquery-1.4.2.js"></script>
<script type="text/javascript">
	function changePass(){
		$.ajax({
	            //提交数据的类型 POST GET
	            type:"POST",
	            //提交的网址
	            url:"changePass.do",
	            //提交的数据
	            data:{
	            	oldPass:jQuery('#oldPass').val(),
	            	newPass:jQuery('#newPass').val()
	            },
	            //返回数据的格式
	            datatype: "json",//"xml", "html", "script", "json", "jsonp", "text".
	            //在请求之前调用的函数
	            //beforeSend:function(){$("#msg").html("logining");},
	            //成功返回之后调用的函数            
	            success:function(data){
	           		//window.location.href = "www.baidu.com"; 
	            	alert(data);
	            },
	            //调用执行后调用的函数
	            //调用出错执行的函数
	            error: function(){
	               alert("服务器出现问题，请联系客服或稍后重试。");
	            }       
	         });
	}
 
</script>

	</head>
	<body>
		<%@ include file="/jsp/front/common/nav.jsp"%>
		<div class="container">
			<div class="leftBar">
				
					
				
				<div class="t_block helpct">
					<div class="hd">
						<div class="wrap">
							用户管理
						</div>
					</div>
					<div class="ct">
						<ul>
							<li>
								<a href="member_index.do">订单管理</a>
							</li>
							<li>
								<a href="changePassword.jsp">密码修改</a>
							</li>
							
						</ul>
					</div>
				</div>
				
			</div>
			
			
			<div class="content">
				
				 

				<div class="rcflight">
					<div class="t_block2 rcflight">
						<div class="hd">
							<div class="wrap">
								密码修改
							</div>
						</div>
						<div class="t_block flightse">
							<div class="ct" id="loginForm">
									<table class="tbl">
										<tr>
											<td>原密码：</td>
											<td><input type="text" id="oldPass" name="oldPass" /></td>
										</tr>
										<tr>
											<td>新密码：</td>
											<td><input type="text" id="newPass" name="newPass" /></td>
										</tr>
										<tr>
											<td></td>
											<td><input type="button" class="btn" value="提交" onclick="javascirpt:changePass()" /></td>
										</tr>
									</table>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		


<script type="text/javascript">
    	
            function QueryString(val){
            	var uri = window.location.search;
            	var re = new RegExp("" +val+ "=([^&?]*)", "ig");
            	return ((uri.match(re))?(uri.match(re)[0].substr(val.length+1)):null);
            }
            
            try{
            	var page = parent.ttsHeader || QueryString("page"); 
            } catch(e) {
            	var page = QueryString("page");
            } 
            
            switch(page){
            	case "home" :
            		setActive("home");
            		break;
            	case "flight" :
            		setActive("flight");
            		break;
            	case "inter" :
            		setActive("inter");
            		break;
            	case "help" :
            		setActive("help");
            		break;
            	case "about" :
            		setActive("about");
            		break;
            	case "order" :
            		setActive("order");
            		break;
            	default :
            		break;
            }
            function setActive(id){
                if ( document.getElementById("nav_" + id) ) {
                    document.getElementById("nav_" + id).className = "active";
                }            	
            } 
        </script>


	</body>
</html>